<!--
 * @Author: your name
 * @Date: 2022-01-19 10:24:19
 * @LastEditTime: 2024-01-15 13:52:14
 * @LastEditors: sunli
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /etrip-ui/src/pages/treeSelect/demo.vue
-->
<script setup>
  import { TreeSelect } from '../../../packages/lib/index'
  import { ref, watch } from 'vue'
  
  const columns = [
    {
      text: '差旅政策',
			children: [
        {text: '不限', value: ''},
        {text: '符合'},
        {text: '违背'}
      ]
    },
		{
      text: '航班时间',
			children: [
        {text: '不限', value: ''},
        {text: '0:00-6:00'},
        {text: '6:00-12:00'},
        {text: '12:00-18:00'},
        {text: '18:00-24:00'}
      ]
    },
		{
      text: '航司类型',
			children: [
        {text: '不限', value: ''},
        {text: '四川航空'},
        {text: '东方航空'},

      ]
    },
    {
      text: '舱位筛选',
      children: [
        {text: '不限', value: ''},
        {text: '经济舱'},
        {text: '公务舱'}
      ]
    },
    {
      text: '起飞机场',
      children: [
        {text: '不限'},
        {text: '经济舱'},
        {text: '公务舱'}
      ]
    },
    {
      text: '到达机场',
      children: [
        {text: '不限'},
        {text: '经济舱'},
        {text: '公务舱'}
      ]
    }
  ]
  const visible_1 = ref(false)
  const visible_2 = ref(false)
  
  const defaults1 = () => {
    visible_1.value = true
  }
   const defaults2 = () => {
    visible_2.value = true
  }
  const confirm = (value, other) => {
  }
  </script>
   <!-- isTs hideShare -->
  <template>
    <div>
      <button @click="defaults1">机票</button>
      <TreeSelect v-model:show="visible_1" :items="columns" hideShare tsFilght title="航班筛选" @confirm="confirm"> </TreeSelect>

      <button @click="defaults2">火车票</button>
      <TreeSelect v-model:show="visible_2" :items="columns" title="火车票筛选" @confirm="confirm"> </TreeSelect>
    </div>
  </template>
  
  <style>
  </style>
  